        <fieldset>
	<legend>Zmena udalosti</legend>
		              
		<?php


    echo form_open('admin/udalost_zmenaValidation/'.$udalost['id_ud']);
    
    echo validation_errors();
    
    echo "<p><label>Názov: </label>";
    if (($this->input->post('nazov') == NULL) and (isset($udalost['nazov']))){
         echo form_input('nazov', set_value('nazov', $udalost['nazov']), $this->input->post('nazov'));
    }else{
         echo form_input('nazov', set_value('nazov', $this->input->post('nazov')), $this->input->post('nazov'));
    }
    echo "</p>";
    
    echo "<p><label>Miestnosť: </label>";
    if (($this->input->post('miestnost') == NULL) and (isset($udalost['miestnost']))){
        echo form_input('miestnost', set_value('miestnost', $udalost['miestnost']), $this->input->post('miestnost'));
    }else{
        echo form_input('miestnost', set_value('miestnost', $this->input->post('miestnost')), $this->input->post('miestnost'));
    }
    echo "</p>";

    $options = array(
                   '0'  => 'Matematika',
                   '1'    => 'Fyzika',
                   '2'   => 'Informatika',
                   '3' => 'Iné',
                 );
                  
    echo "<p><label>Zameranie: </label>";
    if (($this->input->post('zameranie') == NULL) and (isset($udalost['zameranie']))){
        $pom = $udalost['zameranie'];
        echo form_dropdown('zameranie', $options, set_value('zameranie', $pom), $this->input->post('zameranie'));
    }else{
        echo form_dropdown('zameranie', $options, set_value('zameranie', $this->input->post('zameranie')), $this->input->post('zameranie'));
    }
    echo "</p>";
    
    echo "<p><label>Abstrakt: </label>";
    echo "<p><label> </label>";
    if (($this->input->post('abstrakt') == NULL) and (isset($udalost['abstrakt']))){
        echo form_textarea('abstrakt', set_value('abstrakt', $udalost['abstrakt']), $this->input->post('abstrakt'));
    }else{
        echo form_textarea('abstrakt', set_value('abstrakt', $this->input->post('abstrakt')), $this->input->post('abstrakt'));
    }
    echo "</p>";
    
    echo "<p><label>Vyučujúci: </label>";
    if (($this->input->post('ucitel') == NULL) and (isset($udalost['ucitel']))){
        echo form_input('ucitel', set_value('ucitel', $udalost['ucitel']), $this->input->post('ucitel'));
    }else{
        echo form_input('ucitel', set_value('ucitel', $this->input->post('ucitel')), $this->input->post('ucitel'));
    }
    echo "</p>";

    echo "<p><label>Max ľudí: </label>";
    if (($this->input->post('maxLud') == NULL) and (isset($udalost['maxLudi']))){
        echo form_input('maxLud', set_value('maxLud', $udalost['maxLudi']), $this->input->post('maxLud'));
    }else{
        echo form_input('maxLud', set_value('maxLud', $this->input->post('maxLud')), $this->input->post('maxLud'));
    }
    echo "</p>";
    
    echo "<p><label>Max prednášok/týždeň: </label>";
    if (($this->input->post('maxprednasok') == NULL) and (isset($udalost['maxprednasok']))){
        echo form_input('maxprednasok', set_value('maxprednasok', $udalost['maxprednasok']), $this->input->post('maxprednasok'));
    }else{
        echo form_input('maxprednasok', set_value('maxprednasok', $this->input->post('maxprednasok')), $this->input->post('maxprednasok'));
    }
    echo "</p>";
    
    echo "<p><label>Poznámka: </label>";
    if (($this->input->post('poznamka') == NULL) and (isset($udalost['poznamka']))){
        echo form_input('poznamka', set_value('poznamka', $udalost['poznamka']), $this->input->post('poznamka'));
    }else{
        echo form_input('poznamka', set_value('poznamka', $this->input->post('poznamka')), $this->input->post('poznamka'));
    }
    echo "</p>";
    
    echo "<p><label></label>";
    echo form_submit('zmena_udalost_submit', 'Zmeň');
    echo "</p>";
    
    echo form_close();
	echo "<p><label></label>";
  ?><button onclick="location.href='<?php echo base_url()."admin/udalost_delete/".$udalost['id_ud']; ?>'">Vymaž</button>
    </fieldset>
    <br />
    <fieldset>
	<legend>Zmena termínu</legend>
    
    <?php
	/**************************************************************************************************************************/
	/******************* ZMENA TERMINU ****************************************************************************************/
	/**************************************************************************************************************************/
	echo form_open('admin/udalost_zmena_terminu_Validation/'.$id_casu_ud);
	echo validation_errors();
	$optionsD = array(
                   '0'  => 'Pondelok',
                   '1'  => 'Utorok',
                   '2'  => 'Streda',
                   '3'  => 'Štvrtok',
                   '4'  => 'Piatok',
                 );
                 
    echo "<p><label>Deň: </label>";
    echo form_dropdown('den', $optionsD, set_value('den', $cas_udalosti['den']), $this->input->post('den'));
    echo "</p>";
	$cas_od_option_arr = explode(':', $cas_udalosti['cas_od']);
	$cas_od_option = $cas_od_option_arr[0].':'.$cas_od_option_arr[1];
	$cas_do_option_arr = explode(':', $cas_udalosti['cas_do']);
	$cas_do_option = $cas_do_option_arr[0].':'.$cas_do_option_arr[1];
    
    $options = array(
                   '07:00:00'    => '7:00',
                   '08:00:00'    => '8:00',
                   '09:00:00'   => '9:00',
                   '10:00:00' => '10:00',
                   '11:00:00'  => '11:00',
                   '12:00:00'    => '12:00',
                   '13:00:00'   => '13:00',
                   '14:00:00' => '14:00',
                   '15:00:00'  => '15:00',
                   '16:00:00'    => '16:00',
                   '17:00:00'   => '17:00',
                   '18:00:00' => '18:00',
                   '19:00:00' => '19:00',
                   '20:00:00' => '20:00',
				   $cas_udalosti['cas_od'] => $cas_od_option,
				   $cas_udalosti['cas_do'] => $cas_do_option
                 );
                     
    echo "<p><label>Čas od: </label>";
    echo form_dropdown('casOd', $options, set_value('casOd', $cas_udalosti['cas_od']), $this->input->post('casOd'));
    
    echo "  <label class=\"short\">do: </label>";
    echo form_dropdown('casDo', $options, set_value('casDo', $cas_udalosti['cas_do']), $this->input->post('casDo'));
    echo "</p>";
    
    echo "<p><label>Trvanie: </label>";
    echo form_input('trvanie', set_value('trvanie', $cas_udalosti['trvanie']), $this->input->post('trvanie'));
    echo "min</p>";
    
    $options2 = array(
                   '0'    => 'nie',
                   '1'    => 'áno',
                 );
    
    echo "<p><label>Fixný čas: </label>";
    echo form_dropdown('fixCas', $options2, set_value('fixCas', $cas_udalosti['fixna']), $this->input->post('fixCas'));
    echo "</p>";
    
    echo "<p><label></label>";
    echo form_submit('termin_zmena_submit', 'Zmeň');
    echo "</p>";
    echo form_close();
	echo "<p><label></label>";
	?><button onclick="location.href='<?php echo base_url()."admin/cas_udalosti_delete/".$id_casu_ud; ?>'">Vymaž</button>
    </fieldset>
    <fieldset>
	  <legend>Informácie</legend>
    <br>
    <label></label>
    <button onclick="location.href='<?php echo base_url()."admin/vypis_info/".$id_casu_ud; ?>'">Vypíš</button>
     Vypíše zaplnenie a prihlásené kolektívy
    
    </fieldset>